package edu.nf.llmtest.model.document;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @ Author bin
 * @ Create  2025/10/30 下午2:57
 * 对话记录文档
 **/
@Document(indexName = "llm_conversations" , createIndex = false)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ConversationsDoc {
    /**
     * 消息ID
     * */
    @Id
    private  String messageId;
    /**
     * 会话ID
     * */
    @Field(type = FieldType.Keyword)
    private String sessionId;

    /**
     * 用户ID
     * */
    @Field(type = FieldType.Keyword)
    private  Integer userId;
    /**
     * 角色
     * */
    @Field(type = FieldType.Keyword)
    private  String role;
    /**
     * 消息内容
     * */
    @Field(type = FieldType.Keyword)
    private  String message;
    /**
     * 创建时间
     **/
    @Field(type = FieldType.Keyword)
    private String createdTime;
}
